<?php

defined('MYLITS') ? '' : exit('No direct script access allowed');

/**
 * @version     1.0.0
 * @package     mylits engine
 * @license     GNU General Public License version 3
 * @author      Arfan Fudyartanto D N <arfan@mylits.com> - http://engine.mylits.com
 */
class Mylits_Messenger {

    function __construct() {
        
    }

    public static function sent($component, $data) {
        $_SESSION['mylits_messenger'][$component] = $data;
    }

    public static function getInbox($component) {
        $result = isset($_SESSION['mylits_messenger'][$component]) ? $_SESSION['mylits_messenger'][$component] :
                NULL;
        unset($_SESSION['mylits_messenger'][$component]);
        return $result;
    }

}

?>
